/* @(#)GSOrderCancelViewDetailAction.java    V0.1
 *
 * Project: GSdevelop
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   ------------ ---------- ---------------------------------------------------
 *   owen         2006-3-15
 *
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2006 Beijing HiTRUST Technology Co., Ltd. 1808 Room, 
 *        Science & Technology Building, No. 9 South Street, Zhong Guan Cun, 
 *        Haidian District, Beijing ,100081, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Beijing HiTRUST Technology Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with HiTRUST.
 *
 * Warning:
 * =============================================================================
 * 
 */
package com.hitrust.gs.action;

import java.util.ArrayList;

import com.hitrust.gs.bean.GSOrderBean;
import com.hitrust.gs.business.GSOrderProcessor;
import com.hitrust.gs.dao.GSOrderDAO;
import com.hitrust.gs.form.GSOrderCancelForm;
import com.hitrust.gs.lib.GSBaseConstants;
import com.hitrust.gs.service.GSBaseAction;
import com.hitrust.gs.service.GSBaseForm;

/**
 * 取消审购单处理页面
 */
public class GSOrderCancelViewDetailAction extends GSBaseAction{

    public String execute(GSBaseForm aForm) throws Exception {
         GSOrderCancelForm tForm = (GSOrderCancelForm)aForm;
         String tOrderId=tForm.orderId;
        //取得参数订单编号
        //String tOrderId = aForm.getRequest().getParameter("orderId");
        
        try {
            GSOrderProcessor tGSOrderProc = new GSOrderProcessor();
            //由订单编号查询订单及所订产品明细
            ArrayList tList = tGSOrderProc.getOrderSubmitDetail(tOrderId);
            // 暂不需要分页
            // ResultProcess tProc = new ResultProcess();
            // tProc.setResult(tList);
            aForm.getRequest().setAttribute("ordermanufacture", tList);

            GSOrderDAO tOrderDAO = new GSOrderDAO();
            //由订单编号查询订单信息
            GSOrderBean tBean = tOrderDAO.getOrderByTempID(tOrderId);
            aForm.getRequest().setAttribute("orderbean", tBean);
        }
        catch (Exception e) {
            aForm.getRequest().setAttribute("action","A100301.do");
            throw e;
        }
        return GSBaseConstants.FORWARD_SUCCESS;
    }

      
}
